import request from '@/utils/request';

// 查询订单列表
export const listOrder = (query: any) => {
  return request({
    url: '/project/order/list',
    method: 'get',
    params: query
  });
}

// 查询订单详细
export const getOrder = (orderId: any) => {
  return request({
    url: `/project/order/${orderId}`,
    method: 'get'
  });
}

// 新增订单
export const addOrder = (data: any) => {
  return request({
    url: '/project/order',
    method: 'post',
    data: data
  });
}

// 修改订单
export const updateOrder = (data: any) => {
  return request({
    url: '/project/order',
    method: 'put',
    data: data
  });
}

// 删除订单
export const delOrder = (orderId: any) => {
  return request({
    url: `/project/order/${orderId}`,
    method: 'delete'
  });
}
